package HomeWork2.CatAndDog;
/*
定义狗类Dog。属性:毛的颜色color，品种breed。行为:吃饭()，看家lookHome()
 */
public class Dog {
    private String bread;
    private String color;
//Constructor==============================================
    public Dog() {

    }

    public Dog(String bread, String color) {
        this.bread = bread;
        this.color = color;
    }
//Getter and Setter=======================================
    public String getBread() {
        return bread;
    }

    public void setBread(String bread) {
        this.bread = bread;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
//Method=================================================
    public void eat(){
        System.out.println(this.color+"的"+this.bread+"正在啃骨头.....");
    }

    public void lookHome(){
        System.out.println(this.color+"的"+this.bread+"正在看家.....");
    }
}
